[IA64] vti save-restore: preparation opt_feature support
authorAlex Williamson <alex.williamson@hp.com>
Tue, 20 Nov 2007 16:14:43 +0000 (09:14 -0700)
committerAlex Williamson <alex.williamson@hp.com>
Tue, 20 Nov 2007 16:14:43 +0000 (09:14 -0700)
Pass struct domain* to domain_opt_feature().
This patch is preparation patch for HVM domain save/restore opt_feature.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
xen/arch/ia64/vmx/mmio.c
xen/arch/ia64/xen/domain.c
xen/arch/ia64/xen/hypercall.c
xen/include/asm-ia64/domain.h

index 107bcdfdf30bd874f5d43fc6fc9b3d2e5c651f4e..0c0b49c503392ce1780f3370872955a5c9b5e876 100644 (file)
@@ -252,11 +252,11 @@ static inline void set_os_type(VCPU *v, u64 type)
             optf.on = XEN_IA64_OPTF_ON;
             optf.pgprot = (_PAGE_P|_PAGE_A|_PAGE_D|_PAGE_MA_WB|_PAGE_AR_RW);
             optf.key = 0;
-            domain_opt_feature(&optf);
+            domain_opt_feature(v->domain, &optf);
 
             optf.cmd = XEN_IA64_OPTF_IDENT_MAP_REG5;
             optf.pgprot = (_PAGE_P|_PAGE_A|_PAGE_D|_PAGE_MA_UC|_PAGE_AR_RW);
-            domain_opt_feature(&optf);
+            domain_opt_feature(v->domain, &optf);
         }
     }
 }
index d951cca218498b9fa11fc26cc179592438b74358..ab9363c80a2453c8c55d76c7274e43f922ef9565 100644 (file)
@@ -2290,9 +2290,8 @@ optf_set_identity_mapping(unsigned long* mask, struct identity_mapping* im,
  * The vcpu must be paused to avoid racy access to opt_feature.
  */
 int
-domain_opt_feature(struct xen_ia64_opt_feature* f)
+domain_opt_feature(struct domain *d, struct xen_ia64_opt_feature* f)
 {
-       struct domain *d = current->domain;
        struct opt_feature* optf = &d->arch.opt_feature;
        struct vcpu *v;
        long rc = 0;
index cf80c5445745c8e8922706ad33004c6e142d4d1a..5c97f3bb7e116c5416439027df9de1e28418409d 100644 (file)
@@ -229,7 +229,7 @@ ia64_hypercall(struct pt_regs *regs)
                struct xen_ia64_opt_feature optf;
                set_xen_guest_handle(arg, (void*)(vcpu_get_gr(v, 32)));
                if (copy_from_guest(&optf, arg, 1) == 0)
-                       regs->r8 = domain_opt_feature(&optf);
+                       regs->r8 = domain_opt_feature(v->domain, &optf);
                else
                        regs->r8 = -EFAULT;
                break;
index 486696d6790f3e8d2a4678c45e8b609a3adafbc1..1cdb8404edac0ffc27400018c8ded070e5a83ca0 100644 (file)
@@ -116,7 +116,7 @@ struct opt_feature {
     (1UL << XEN_IA64_OPTF_IDENT_MAP_REG5_BIT)
 
 /* Set an optimization feature in the struct arch_domain. */
-extern int domain_opt_feature(struct xen_ia64_opt_feature*);
+extern int domain_opt_feature(struct domain *, struct xen_ia64_opt_feature*);
 
 struct arch_domain {
     struct mm_struct mm;